#!/usr/bin/python
# -*- coding: UTF-8 -*-

import os
import sys
import init
import daily
import rule

if __name__ == '__main__':
    #查询参数
    n = sys.argv[1] if len(sys.argv)==2 else 0
    # print('判断是否需要初始化')
    #读取 ./data/csv中是否有文件
    # p = os.getcwd()+'/data/csv/stock'   
    # if not len(os.listdir(p))>0:
    if n=='1':
        print('强制系统初始化')
        init.getCode(n)
    else:
        print('更新当天数据')
        daily.getTdxFile()
        pass
        